#ifndef __COLLISION_REACTION_H
#define __COLLISION_REACTION_H

#include <map>
#include <QString>
#include <string>


//typedef enum {
      //  DIE,
    //    IGNORED,
  //      HARM
//} Reactions;

#undef IGNORED
 
enum Reactions{
  DIE,
  IGNORED,
  HARM
};

 using namespace std;

class CollisionReaction {

private:
 
	std::map<string, Reactions> reactions;
	
public:
	CollisionReaction () { }
	
  void addReaction (const string &name, const Reactions r) { reactions[name] = r; }
	
	Reactions getReaction (const string &name) { 
		
		std::map<string, Reactions>::iterator it; // = reactions.find(name);
  
    
    it = reactions.find(name);

		if (it == reactions.end())
           return IGNORED;
		return it->second;
	}
	
};

#endif
